package classificacao;
/**
 * Classe que retrata o objeto Word (wi)e armazena o numero de documentos de uma determinada classe (SPAM CS ou NSPAM NS). 
 * que a palavra especifica apareceu 
 */
 
/**
 * @author Rafael Ortega
 *
 */
public class Word {
	
	private String word;
	private int wordFrequency;
	
	public Word(){}
	
	public Word(String word){
		this (word,1);
	}
	public Word(String word,int wordfrequency){
		this.word=word;	
		this.wordFrequency=wordfrequency;
	}

	/**
	 * @return the word
	 */
	public String getWord() {
		return word;
	}

	/**
	 * @param word the word to set
	 */
	public void setWord(String word) {
		this.word = word;
	}

	/**
	 * @return the wordFrequency
	 */
	public int getWordFrequency() {
		return wordFrequency;
	}

	/**
	 * @param wordFrequency the wordFrequency to set
	 */
	public void setWordFrequency(int wordFrequency) {
		this.wordFrequency = wordFrequency;
	}
	
	/**
	 * Incrementa o a frequencia de ocorrencia da palavra. 
	 * @param n valor numerico a ser adicionado a frequencia atual.
	 */
	public void incWordFrequnce(int n){
		this.wordFrequency=this.wordFrequency+n;
	}

}
